function [elements,processInfo] = FinalizeSolutionStep...
    (elements,model,processInfo)
elements = calculateLimitStage(elements,model);
ne = model.countElements();
for i=1:ne
    e = model.getElement(i-1);
    face = e.getFace();
    if elements(i).isCrack==1
        %save Xi to Xi_old
        elements(i).Xi_old = elements(i).Xi;
        redo = 1;
    end
    %save ue to ue_old
    elements(i).ue_old = face.getUHatLocal();
end
end
